package com.weipai.education.dao;

import com.weipai.education.model.*;

import java.util.List;
import java.util.Map;

/**
 * @Author: 曹朋飞
 * @Date: 2018/12/11 13:25
 */
public interface ProductDao {
    List<Map<String,Object>> list(Integer start, Integer size, Integer key, String productCateId);

    Product listNumber(String name);

    Integer listAmount(Integer key, String productCateId);

    ProductDesc selectProductDescByProductId(Integer id);

    int updateProduct(Product product);

    int updateProductDesc(ProductDesc productDesc);

    int insertProduct(Product product);

    int insertProductDesc(ProductDesc productDesc);

    Product selectByPrimaryKey(String id);

    Map<String,Object> getProductInfo(String productId);

    Map<String,Object> getProductPriceByUserId(String productId, String userId);

    void insertProductPrice(List<ProductPrice> productPrice);

    void updateProductPrice(List<ProductPrice> productPrice);

    List<Map<String,Object>> getProductPrice(String productId);

    int insertProductGoods(ProductGoods productGoods);

    int insertNumber(Integer productNumber);

    List<Map<String,Object>> getAllGoodsBar(Integer productId, String type);

    List<Map<String,Object>> getProductPriceByProductCateIdAndUserCateId(Integer productCateId, Integer userCateId);

    int getGoodsBarCountByProductId(Object productId);

    List<Map<String,Object>> getProductBySpuNumber(String spuNumber);

    int updateProductGoods(String goodsBarCode, int isUse, String isPrice, String isDamage);


    PurchaseDetail getProductById(String productName);
}
